import React, { Component } from 'react'


class Footer extends Component {
    state = {
        name: '张三'
    }
    render(){
        return (<>
            <footer style={{backgroundColor: '#f66', height: 50}}> 页脚 </footer>
        </>)
    }
}


const Page1 = ()=>{

    return (<>
        <h1>Page1</h1>
        <Footer />
    </>)
}

const Page2 = ()=>{

    return (<>
        <h1>Page2</h1>
        <Footer />
    </>)
}

export default class App extends Component {
  render() {
    return (
      <div>

            <Page1 />
            
            <hr />

            <Page2 />

      </div>
    )
  }
}
